var webpack = require('webpack');
module.exports = {
  //页面入口文件配置
  entry:__dirname +'./VUEobj/src/assets/css',
  //入口文件输出配置
  output:{
    path:__dirname +"VUEobj/src/assets/css",//这个要放在一个绝对路径下
    filename:'dite.js',
  },
  module:{
    loaders:[
      {test:/\.scss$/,loader:'style-loader!css-loader!sass-loader'},//这里需要下载style-loader css-loader sass-loader
      {test :/\.jsx$/,loader:"babel-loader",query:{
        presets:['react','es2015']
      }}//babel可以将ES6转换为ES5   需要下载 babel-loader babel-presets-es2015 babel-presets-react
    ]
  },
//    module:{
//        //加载器配置
//        loaders:[
//        {test:/\.css$/,loader:'style-loader!css-loader'},
//        {test:/\.js$/,loader:'jsx-loader?sourceMap'},
//        {test:/\.scss$/,loader:'style!css!sass!sourceMap'},
//        {test:/\.(png|jpg)$/,loader:'url-loader?limit=8192'}//limit=8192将小于8kb的图片转换为base64
//        ]
//    },
  resolve:{
    extensions:['.js','.json','.scss']
  },
  plugins:[
    //去除代码块内的告警语句
    new webpack.optimize.UglifyJsPlugin({
      compress:{
        warnings:false
      }
    }),
    //优先考虑使用最多的模块，并为它们分配最小的ID
    //new webpack.optimize.OccurenceOrderPlugin()
  ]
}
